% Offset of subtuples in an object tuple.
%  element(?FIELD_GLOBAL_STARTPOS, Object) is the first tuple containing fields
%  there is administrative infromation before that: currently: 
%    1. class atom
%    2. global version number
-define(FIELD_GLOBAL_STARTPOS,2).

% Offset of fields in an object subtuple.
%  element(?FIELD_LOCAL_STARTPOS, element(?FIELD_GLOBAL_STARTPOS, Object)) is the first tuple field of the object
%  there is administrative infromation before that in each subtuple: currently:
%    1. class of fields in the subtuple
%    2. local version number
-define(FIELD_LOCAL_STARTPOS,4).

-record(class_field,
    {
    name :: atom(),
    value :: any(),
    local_pos,
    global_pos,
    access :: pulbic | private
    }).

-record(class,
    {name :: atom(),
    class_types,
    class_level,
    fieldmap,
    local_version :: integer(),
    global_version :: integer(),
    vmt,
    
    % szarmaztatott
    super_class,
    impl_module,
    
    
    % lokalis
    functions,
    loaded_subclasses = [] :: [atom()],
    
    src :: [class_local]
    }).

-record(class_local,
   {name :: atom()
   ,super_class :: atom()
   ,version :: integer()
   ,impl_module :: atom()
   ,fields
   ,methods :: [{atom(), integer()}]
   ,functions :: [{atom(), integer()}]
   ,default_field_values
   }).


-record(compile_info,
    {local_fields,
     local_class_data,
     class_definition :: class | atom(none),
     fieldmap_av,
     classes,
     
     proxy_module,

     silent,
     cctrans,
     upgrade_mode,
     out_dir

    }).

